import request from '@/utils/request'

// 查询
export const sysRole = (params) => {
  return request({
    url: '/sys/role',
    params
  })
}

// 新增角色
export const sysRolePost = (data) => {
  return request({
    url: '/sys/role',
    method: 'post',
    data
  })
}

// 删除角色
export const sysRoleDelete = (id) => {
  return request({
    url: '/sys/role/' + id,
    method: 'delete'
  })
}

// 编辑角色
export const sysRolePut = (data) => {
  return request({
    url: '/sys/role/' + data.id,
    method: 'put',
    data
  })
}

// 根据id 获取 企业信息
export const getinfo = (id) => {
  return request({
    url: '/company/' + id
  })
}
